#!/usr/bin/env python
# -*- coding:utf8 -*-
# uncompyle6 version 2.15.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Jul  1 2017, 13:36:56) 
# [GCC 4.4.6 20110731 (Red Hat 4.4.6-4)]
# Embedded file name: ./paas/esb/bkcore/migrations/0007_auto_20170619_1050.py
# Compiled at: 2017-11-16 15:44:28
from __future__ import unicode_literals
from django.db import migrations, models
import datetime, esb.bkcore.models

class Migration(migrations.Migration):
    dependencies = [
     (u'bkcore', u'0006_esbchannel_comp_conf')]
    operations = [
     migrations.CreateModel(name='AppComponentPerm', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'app_code', models.CharField(max_length=64, verbose_name=u'蓝鲸应用编码')),
      (
       'component_id', models.IntegerField(verbose_name=u'组件ID')),
      (
       'expires', models.DateTimeField(default=esb.bkcore.models.init_app_comp_perm_expires, verbose_name=u'APP访问组件过期时间')),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间')),
      (
       'last_accessed_time', models.DateTimeField(default=datetime.datetime.now, verbose_name=u'APP最后访问组件时间'))], options={'db_table': 'esb_app_component_perm',
        'verbose_name': u'APP组件权限',
        'verbose_name_plural': u'APP组件权限'
        }),
     migrations.CreateModel(name='ComponentAPIDoc', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'board', models.CharField(db_index=True, max_length=64, null=True, blank=True)),
      (
       'component_id', models.IntegerField(help_text=u'对应 ESBChannel 中的组件ID', unique=True, verbose_name=u'组件ID')),
      (
       'doc_md', models.TextField(null=True, verbose_name=u'组件文档（MD格式）', blank=True)),
      (
       'doc_html', models.TextField(null=True, verbose_name=u'组件文档（HTML格式）', blank=True)),
      (
       'doc_md_md5', models.CharField(default=b'', max_length=128, blank=True)),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间')),
      (
       'updated_time', models.DateTimeField(auto_now=True, verbose_name=u'创建时间'))], options={'db_table': 'esb_api_doc',
        'verbose_name': u'组件接口文档',
        'verbose_name_plural': u'组件接口文档'
        }),
     migrations.CreateModel(name='FeedbackForComponentDocs', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'board', models.CharField(db_index=True, max_length=64, null=True, blank=True)),
      (
       'operator', models.CharField(max_length=32, verbose_name=u'反馈者')),
      (
       'component_id', models.IntegerField(help_text=u'对应 ESBChannel 中的组件ID', verbose_name=u'组件ID')),
      (
       'content', models.TextField(default=b'', null=True, verbose_name=u'反馈内容', blank=True)),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间'))], options={'db_table': 'esb_api_doc_feedback',
        'verbose_name': u'接口反馈',
        'verbose_name_plural': u'接口反馈'
        }),
     migrations.AddField(model_name='esbchannel', name='component_name', field=models.CharField(default=b'', max_length=64, null=True, verbose_name=u'组件英文名', blank=True)),
     migrations.AddField(model_name='esbchannel', name='is_hidden', field=models.BooleanField(default=False, help_text=u'是否显示文档，及是否在权限申请中展示', verbose_name=u'组件是否隐藏')),
     migrations.AddField(model_name='esbchannel', name='perm_level', field=models.IntegerField(default=0, verbose_name=u'权限级别', choices=[(0, u'无限制'), (1, u'普通权限'), (2, u'敏感权限'), (3, u'特殊权限')])),
     migrations.AddField(model_name='esbchannel', name='rate_limit_conf', field=models.TextField(help_text=u'限制访问频率，允许多种规则，例如{"app_ratelimit": {"__default": {"token":1000, "minute": 1}, "gcloud": {"token":1000, "minute": 1}}}', null=True, verbose_name=u'请求频率配置', blank=True)),
     migrations.AddField(model_name='esbchannel', name='rate_limit_required', field=models.BooleanField(default=False, verbose_name=u'是否校验访问频率')),
     migrations.AlterUniqueTogether(name='appcomponentperm', unique_together=set([(u'app_code', u'component_id')]))]
